package com.yy.wga.goods.service.entity.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yy.wga.common.mysql.dto.BaseEntity;
import com.yy.wga.goods.service.typeHandler.GoodsSpuImgTypeHandler;
import com.yy.wga.goods.service.typeHandler.GoodsSpuJacksonTypeHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.List;

@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName(value = "goods_head_supplier_info", autoResultMap = true)
public class GoodsHeadSupplierInfoDO extends BaseEntity {

    /**
     * 所属店铺ID
     */
    @TableField(value = "shop_appid")
    private String shopAppid;


    /**
     * 商品ID
     */
    @TableField(value = "spu_id")
    private String spuId;


    /**
     * 商品标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 商品头图URL列表
     */
    @TableField(value = "head_img", typeHandler = GoodsSpuImgTypeHandler.class)
    private List<String> headImg;

    /**
     * 销售价
     */
    @TableField(value = "sale_price")
    private Integer salePrice;

    @TableField(value = "ratio")
    private Integer ratio;

    @TableField(value = "service_ratio")
    private Integer serviceRatio;


    @TableField(value = "skus", typeHandler = GoodsSpuJacksonTypeHandler.class)
    private List<GoodsSpuDO.Sku> skus;

    @TableField(value = "first_cate_id")
    private String firstCateId;

    @TableField(value = "second_cate_id")
    private String secondCateId;

    @TableField(value = "third_cate_id")
    private String thirdCateId;
}
